package com.sgolub.commanndsonline.ws.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sgolub.commanndsonline.ws.dao.AdvertisingRegistryItemDAO;
import com.sgolub.commanndsonline.ws.dao.AdvertisingRegistryOperationDAO;
import com.sgolub.commanndsonline.ws.entity.AdvertisingRegistryItem;
import com.sgolub.commanndsonline.ws.entity.AdvertisingRegistryOperation;

@Service
public class AdvertisingRegistryOperationServiceImpl implements AdvertisingRegistryOperationService{

	@Autowired
	private AdvertisingRegistryOperationDAO advertisingRegistryOperationDAO;
	
	@Transactional
	public AdvertisingRegistryOperation get(Integer id) {
		return advertisingRegistryOperationDAO.get(id);
	}

	@Transactional
	public void add(AdvertisingRegistryOperation advertisingRegistryOperation) {
		advertisingRegistryOperationDAO.add(advertisingRegistryOperation);
	}

	@Transactional
	public void update(AdvertisingRegistryOperation advertisingRegistryOperation) {
		advertisingRegistryOperationDAO.update(advertisingRegistryOperation);
	}

	@Transactional
	public void remove(Integer id) {
		advertisingRegistryOperationDAO.remove(id);
	}

	@Transactional
	public List<AdvertisingRegistryOperation> list() {
		return advertisingRegistryOperationDAO.list();
	}

	@Transactional
	public List< AdvertisingRegistryOperation> listActive(){
		return advertisingRegistryOperationDAO.listActive();
	}
	
	@Transactional
	public List<AdvertisingRegistryOperation> filter() {
		return advertisingRegistryOperationDAO.list();
	}
	
}
